package com.suke.czx.modules.projectType.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.suke.czx.common.validate.ProductSaveGroup;
import com.suke.czx.common.validate.ProductUpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 应用模块名称: 项目类型
 * 代码描述: 项目类型实体
 * copyright: AUZAR ALL RIGHTS RESERVED
 * company: AUZAR
 *
 * @author: 颜米晨
 * @date: 2021/09/06 17:47:28
 */
@Data
@ApiModel(value = "产品管理")
@EqualsAndHashCode(callSuper = true)
public class ProjectType extends Model<ProjectType> {

    @ApiModelProperty(value = "项目类型id")
    @TableId(value = "project_type_id")
    @NotNull(groups = {ProductUpdateGroup.class}, message = "项目类型编码不能为空")
    public Long projectTypeId;

    @ApiModelProperty(value = "项目类型")
    @NotBlank(groups = {ProductSaveGroup.class, ProductUpdateGroup.class}, message = "项目类型名称不能为空")
    public String projectType;

    @ApiModelProperty(value = "备注")
    public String note;

    @ApiModelProperty(value = "删除标记  0：删除   1：正常")
    public Integer del;

    @ApiModelProperty(value = "创建者id")
    public Long creator;

    @TableField(exist = false)
    @ApiModelProperty(value = "创建者id")
    public String creatorName;

    @ApiModelProperty(value = "创建者姓名")
    public Date createTime;

    @ApiModelProperty(value = "更新者id")
    public Long updater;

    @TableField(exist = false)
    @ApiModelProperty(value = "更新者姓名")
    public String updaterName;

    @ApiModelProperty(value = "更新时间")
    public Date updateTime;

}
